<?php
include_once('filtro_cabecera.php');
include_once "../funciones/funciones_php.php";
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
        <script type="text/javascript" src="../js/jquery-1.5.2.js"></script>
		<script type="text/javascript" src="../js/jquery-ui-1.8.14.custom.min.js"></script>
        <script type='text/javascript' src='../js/jquery.autocomplete.js'></script>
        <script type="text/javascript" src="../js/jquery.validate.js"></script>
        <script type='text/javascript' src='../js/funciones_js.js'></script>
		<link type="text/css" href="../css/start/jquery-ui-1.8.14.custom.css" rel="Stylesheet" />
		<!--<link type="text/css" href="../css/demos.css" rel="Stylesheet" />-->
		<!--<link rel="stylesheet" type="text/css" href="../css/thickbox.css" />-->
        <link rel="stylesheet" type="text/css" href="../css/plantilla.css" />
		<link rel="stylesheet" type="text/css" href="../css/jquery.autocomplete.css" />
		<link rel="stylesheet" type="text/css" href="../css/menu.css" />
  <script>
        $(document).ready(function()
        {
            $('#cancelar').button();
            $('#guardar').button();
        });

</script>
</head>
<body>
<div id="titulo_seccion">
    <fieldset>
        <table>
        <tr>
            <td><font>Asignar Chofer de retiro</font></td>
        </tr>
        </table>
    </fieldset>
</div>
<form action="guardar_asignar_chofer_popup.php" method="post">

<fieldset>

         <legend>Asignar Chofer</legend>
        <?php

            $orden_flete = $_GET['o_flete'];
            echo "<table>";
            echo "<tr>";
            echo "<td>Orden de flete:</td><td>".$orden_flete."</td>";
            echo "</tr><tr>";
            echo "<td>Chofer:</td><td>";
            conectar();
            $pg_c = sprintf("SELECT *
                            FROM empleado
                            WHERE empleado.id_tipo_empleado = '%d'",pg_escape_string(3));
            $cons_chof = pg_query($pg_c) or die ("ERROR");

            echo "<select name='empleado'>";

                while ($reg2 = pg_fetch_array($cons_chof))
                {
                echo "<option value=".$reg2['id_empleado'].">".$reg2['nombre']."";
                }

            echo "</td>
                    </tr></table></select>";
            ?>
            <br><br />
            <input type="hidden" value="<?php echo $orden_flete ?>" name="orden">
            <input type="submit" value="Guardar" name="guardar" id="guardar"/>
            <input type=button value="Cancelar" id="cancelar" onclick="cerrar_ventana()">

</fieldset>
</form> 
</body>
</html>

